import pymysql


HOST_IP = 'localhost'  
PORT = '3306'
USER = 'root'
PASSWD = '123456'
DB_NAME = 'love_movie'

ID = 'ID'
length = 'length'
BTaddress = 'BTaddress'
picture_address = 'picture_address'
sql = "INSERT INTO movies(  ID, length, BTaddress, picture_address ) VALUES ( %s, %s, %s, %s)"

Connection = pymysql.connect(
    host = HOST_IP,
    # port = PORT,
    user = USER,
    passwd = PASSWD,
    db = DB_NAME,
    charset = 'utf8mb4',
    use_unicode = True
)
Connection.cursor().execute(sql,(ID, length, BTaddress, picture_address))
Connection.commit()